package com.longmao.eduservice.client;

import com.longmao.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author longmao
 * @date 2022/2/10 16:09
 * Content:    服务调用 ，定义调用方法的路径（同生产者接口）
 */
@Component
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)  //服务调用的名称
public interface VodClient {

    /**
     * 删除阿里云单个视频
     * @param videoId
     * @return
     */
    @DeleteMapping("/eduvod/video/deleteVodVideo/{videoId}")
    public R deleteVodVideo(@PathVariable("videoId") String videoId);

    /**
     * 删除多个视频
     * @param videoIds
     * @return
     */
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIds") List<String> videoIds);
}
